﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using ProcessRoll.Models;

namespace ProcessRoll.Models
{
    public class Process : EntityBase
    {
        [Display(Name="流程名称"),MaxLength(50)]
        public string ProcessName { get; set; }

        public Employee Applyer { get; set; }

        public Employee RealApplyer { get; set; }

        public List<Department> Department { get; set; }

        public List<Field> Fields { get; set; }

        public List<Condition> Conditions { get; set; }

        public List<Queue> Queues { get; set; }

        [Display(Name = "版本号"),Range(1, Int16.MaxValue)]
        public int Version { get; set; }

        [Display(Name = "流程类别")]
        public string Category { get; set; }

        [Display(Name = "是否允许代理")]
        public bool AllowProxy { get; set; }

        [Display(Name = "审批周期(天)")]
        public int Duration { get; set; }
    }

     public class ProcessIntance:EntityBase
    {
        public int? ProcessID { get; set; }
        public virtual Process Process { get; set; }

        public string Folio{get;set;}

        public List<FieldInstance> FieldIntances { get; set; }

        //public List<EA> EAs { get; set; }
    }


}


   